from django.contrib import admin
import xadmin
from .models import Type
from .models import Resources
from .models import RComment
from .models import RGood
# Register your models here.
class TypeAdmin(object):
    list_display = ('name','status','sort','ctime')
    list_per_page = 10
xadmin.site.register(Type, TypeAdmin)

class ResourcesAdmin(object):
    list_display = ('title','view','comments','goods','status','ctime')
    list_per_page = 10
    style_fields = {"content": "ueditor"}
xadmin.site.register(Resources, ResourcesAdmin)

class RCommentAdmin(object):
    list_display = ('resources','user',"ctime")
    list_per_page = 10
    style_fields = {"content": "ueditor"}
xadmin.site.register(RComment, RCommentAdmin)


class RGoodAdmin(object):
    list_display = ('resources','user',"ctime")
    list_per_page = 10
xadmin.site.register(RGood, RGoodAdmin)